package com.neusoft.elmboot.service.impl;

import java.math.BigDecimal;

import com.neusoft.elmboot.mapper.OrdersMapper;
import com.neusoft.elmboot.po.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neusoft.elmboot.constants.TransactionStatus;
import com.neusoft.elmboot.mapper.VirtualWalletMapper;
import com.neusoft.elmboot.mapper.VirtualWalletTransactionMapper;
import com.neusoft.elmboot.service.VirtualWalletService;

@Service
public class VirtualWalletServiceImpl implements VirtualWalletService {
	@Autowired
	private VirtualWalletMapper virtualWalletMapper;
	@Autowired
	private VirtualWalletTransactionMapper transactionMapper;

	@Override
	public VirtualWallet getVirtualWalletByUserId(String userId) {
		return virtualWalletMapper.getVirtualWalletByUserId(userId);
	}

	@Override
	public VirtualWallet getVirtualWallet(Integer walletId) {

		return virtualWalletMapper.getVirtualWallet(walletId);
	}

	@Override
	public BigDecimal getBalance(Integer walletId) {

		return virtualWalletMapper.getBalance(walletId);
	}

	@Override
	public int updateBalance(VirtualWallet virtualWallet) {
		return virtualWalletMapper.updateBalance(virtualWallet);
	}



}